package com.xzz.mybatis.generator.dcevm;

import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.agent.ByteBuddyAgent;

import java.lang.instrument.Instrumentation;

/**
 *
 */
@Slf4j
@UtilityClass
public class MyDynamicCodeAgent {

    private static Instrumentation instrumentation;

    public static void initBeanMethod(){
        MyDynamicCodeAgent.instrumentation = ByteBuddyAgent.install();
        log.warn("dynamic code instrumentation is ready");
    }

    public static Instrumentation getInstrumentation() {
        return instrumentation;
    }
}
